package com.agileboot.attendance.domain.settlement.dto;

import com.agileboot.attendance.domain.settlement.enums.SettlementPeriodType;
import com.agileboot.attendance.domain.settlement.enums.SettlementStatus;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.util.List;

/**
 * 结算单请求对象
 */
@Data
@ApiModel("结算单请求对象")
public class SettlementBillRequest {

    @ApiModelProperty(value = "结算单ID")
    private Long id;

    @NotNull(message = "项目ID不能为空")
    @ApiModelProperty(value = "项目ID", required = true)
    private Long projectId;

    @NotNull(message = "订单ID不能为空")
    @ApiModelProperty(value = "订单ID", required = true)
    private Long orderId;

    @NotNull(message = "供应商ID不能为空")
    @ApiModelProperty(value = "供应商ID", required = true)
    private Long supplierId;

    @NotNull(message = "结算周期类型不能为空")
    @ApiModelProperty(value = "结算周期类型", required = true)
    private SettlementPeriodType periodType;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "结算开始日期不能为空")
    @ApiModelProperty(value = "结算开始日期", required = true)
    private LocalDate startDate;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "结算结束日期不能为空")
    @ApiModelProperty(value = "结算结束日期", required = true)
    private LocalDate endDate;

    @ApiModelProperty(value = "人员ID列表", required = true)
    @NotEmpty(message = "人员列表不能为空")
    private List<Long> personnelIds;

    @ApiModelProperty(value = "结算单状态")
    private SettlementStatus status;

    @ApiModelProperty(value = "备注")
    private String remark;
} 